﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using System.Collections.Generic;

using My.ELibrary.Model.Notic;
using My.ELibrary.Business.Notic;

public partial class Notic_NoticList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            
            List<ElibNoticeGroupOneModel> list = ElibNoticeGroupOneBLL.GetInstance().GetElibNoticeGroupOne();
            this.DataList1.DataSource = list;
            this.DataList1.DataBind();
      
        }
    }

    protected string GetNotice(string id)
    {
        List<ElibNoticeModel> list = ElibNoticeBLL.GetInstance().GetElibNoticeList(id);
        string html = " <a href='NoticeDetail.aspx?id={0}' target='_blank'>{1}</a> ";
        string Header = string.Empty;
        if (list != null && list.Count > 0)
        {
            foreach (ElibNoticeModel obj in list)
            {
                Header += string.Format(html, obj.Id.ToString(), obj.Title) + "<br /><br />";
            }
        }
        return Header;
    }
}
